<template>
  <div id="app">
<!--    <Index></Index>-->
     <router-view></router-view>
  </div>
</template>

<script>
import './assets/global.css'

export default {
  name: 'App',
  components: {
    // Index,
  },
  data() {
    return {
      user:JSON.parse(sessionStorage.getItem('CurUser'))
    }
  },
  watch:{
    '$store.state.menu':{
      handler(newVal,oldVal){
        console.log(newVal)
        if(!oldVal && this.user && this.user.no){
          this.$store.commit('setMenu',newVal)
        }
      },
      deep:true,
      immediate:true
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  //text-align: center;
  height: 100%;
}
</style>
